<template>
  <el-dialog
    v-model="isShow"
    :title="title"
    width="80%"
    :close-on-click-modal="false"
    @close="handleClose"
  >
    <h3>运单编号：xxxxx</h3>
    <row :gutter="20">
      <el-col :xs="24" :sm="4">

      </el-col>
      <el-col :xs="24" :sm="16">

      </el-col>
      <el-col :xs="24" :sm="4">

      </el-col>
    </row>
    <el-divider />
    <h6 class="mb-4">
      <b>关联订单</b>
    </h6>
    <el-table
          :data="tableData"
          stripe
          border
          style="width: 100%"
          >
          <el-table-column label="序号" type="index" width="80" />
          <el-table-column label="订单号" prop="publicKey" />
          <el-table-column label="紧急程度" prop="publicKey" />
          <el-table-column label="状态" prop="publicKey" />
          <el-table-column label="合同类型" prop="publicKey" />
          <el-table-column label="托运人" prop="publicKey" />
          <el-table-column label="发货人" prop="publicKey" />
          <el-table-column label="发货地" prop="publicKey" />
          <el-table-column label="计划发货时间" prop="publicKey" />
          <el-table-column label="收货人" prop="publicKey" />
          <el-table-column label="收货地" prop="publicKey" />
          <el-table-column label="计划收货时间" prop="publicKey" />
          <el-table-column label="货物" prop="publicKey" />
          <el-table-column label="总量" prop="publicKey" />
          <el-table-column label="合同金额（元）" prop="publicKey" />
          <el-table-column label="装运量" prop="publicKey" />
          <el-table-column label="签收量" prop="publicKey" />
          <el-table-column label="运输方式" prop="publicKey" />
          <el-table-column label="定价类型" prop="publicKey" />
          <el-table-column label="参考定价（元）" prop="publicKey" />
          <el-table-column label="创建人" prop="publicKey" />
          <el-table-column label="创建时间" prop="publicKey" />
          <el-table-column label="操作" prop="publicKey" >
            <template #default="scope">
              <el-button
                size="small"
                icon="document"
                type="primary"
                text
                @click="handleOperate(refShowDetail,scope.row)"
              >详情</el-button> 
            </template>
          </el-table-column>
    </el-table>
    <el-descriptions :column="3" class="mt-4">
      <el-descriptions-item label-align="right" label="运输方式">{{row.publicName}}</el-descriptions-item>
      <el-descriptions-item label-align="right" label="装运说明">{{row.publicKey}}</el-descriptions-item>
      <el-descriptions-item label-align="right" label="备注">{{row.publicValue}}</el-descriptions-item>
      <el-descriptions-item label-align="right" label="运动金额">{{row.createTime}}</el-descriptions-item>
    </el-descriptions>

  </el-dialog>
</template>

<script setup lang="ts">
import {ElMessage, ElMessageBox} from 'element-plus'
import { ref, reactive, inject, getCurrentInstance, ComponentInternalInstance } from 'vue';
const {proxy} = getCurrentInstance() as ComponentInternalInstance;
let optionData:any = inject('optionData'); 
const emit = defineEmits(['confirm']);
let isShow = ref(false);
let title = ref('运单详情');
let row:any = reactive({});
const init = (data:any) => {
  row = data;
  isShow.value = true;
};

const tableData = reactive([{id:1}]);
const handleClose = () => {
  console.log('关闭');
};
const toSubmit = async ()=>{
  
}
defineExpose({
  init,
})
</script>

<style>

</style>